package demo.shiro.action;

import smart.framework.annotation.Action;
import smart.framework.annotation.Request;
import smart.framework.bean.View;
import smart.security.SmartSecurityHelper;

@Action
public class LogoutAction {

    @Request.Get("/logout")
    public View logout() {
        // 获取当前用户并进行登出操作
        SmartSecurityHelper.logout();

        // 重定向到首页
        return new View("/");
    }
}
